package com.sky.mapper.common;

import com.sky.pojo.Courier;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface CourierMapper {
    @Select("select * from tb_courier where on_job = 1")
    List<Courier> findAllOnJob();

    List<Map<String,Long>> findTodayCourierOrderNumByCourierId(@Param("idsList") List<Long> idsList,
                                                  @Param("localDate") String localDate);

    List<Long> findCourierOrderingLess12ByIds(@Param("idsList") List<Long> idsList2,
                                                 @Param("localDate") String localDate);

    @Select("select * from tb_courier where telephone = #{telephone}")
    Courier findByPhone(String telephone);

    @Select("select * from tb_courier where id = #{id}")
    Courier findById(Long id);
}
